<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Create a new pen</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.printer-create-font.html">printer_create_font</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.printer-delete-brush.html">printer_delete_brush</a></div>
 <div class="up"><a href="ref.printer.html">Printer 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.printer-create-pen" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">printer_create_pen</h1>
  <p class="verinfo">(PECL printer SVN)</p><p class="refpurpose"><span class="refname">printer_create_pen</span> &mdash; <span class="dc-title">Create a new pen</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.printer-create-pen-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>printer_create_pen</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$style</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$width</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$color</code></span>
   )</div>

  <p class="para rdfs-comment">
   The function creates a new pen and returns a handle to it. A pen is
   used to draw lines and curves. For an example see
   <span class="function"><a href="function.printer-select-pen.html" class="function">printer_select_pen()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.printer-create-pen-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">style</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">style</code></em> must be one of the following constants:
       <ul class="itemizedlist">
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_PEN_SOLID</code></strong>:
          creates a solid pen.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_PEN_DASH</code></strong>:
          creates a dashed pen.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_PEN_DOT</code></strong>:
          creates a dotted pen.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_PEN_DASHDOT</code></strong>:
          creates a pen with dashes and dots.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_PEN_DASHDOTDOT</code></strong>:
          creates a pen with dashes and double dots.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_PEN_INVISIBLE</code></strong>:
          creates an invisible pen.
         </span>
        </li>
       </ul>
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">width</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">width</code></em> specifies the width of the pen.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">color</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">color</code></em> must be a color in RGB hex format, i.e. 
       &quot;<em>000000</em>&quot; for black.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.printer-create-pen-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns a pen handle or <strong><code>FALSE</code></strong> on error.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.printer-create-font.html">printer_create_font</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.printer-delete-brush.html">printer_delete_brush</a></div>
 <div class="up"><a href="ref.printer.html">Printer 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
